06. Flat File Structure

Flat File Structure

Flat File Structure

Flat files contain tabular data in plain text format with one data record per line and each record or line having one or more fields. These fields are separated by delimiters, like commas, tabs, or colons.

Advantages of flat files include:

  • They're text files and therefore human readable.
  • Lightweight.
  • Simple to understand.
  • Software that can read/write text files is ubiquitous, like text editors.
  • Great for small datasets.

Disadvantages of flat files , in comparison to relational databases, for example, include:

  • Lack of standards.
  • Data redundancy.
  • Sharing data can be cumbersome.
  • Not great for large datasets (see "When does small become large?" in the Cornell link in More Information ).

Quiz

Are the files pictured below flat files? Match yes or no to each file number in the following quiz.

File #1: animals.csv

File #2: animals.tsv

File #3: animals.txt

File #4: animals.txt

Are these flat files?

QUIZ QUESTION: :

Are the files pictured above flat files?

ANSWER CHOICES:



File

Flat File?

No

Yes

Yes

Yes

Yes

No

No

No

SOLUTION:

File

Flat File?

No

Yes

Yes

Yes

Yes

Yes

Yes

Yes

Yes

Yes

Yes

Yes

Yes

No

No

No